import Vue from 'vue'
import Vuex from 'vuex'
import VuexPersist from "vuex-persist";

const vuexLocal = new VuexPersist({
  storage: window.localStorage,
})

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    record:[]
  },
  getters: {
  },
  mutations: {
    add(state,val) {
      state.record.push(val)
    },
    del(state) {
      state.record=[]
    }
  },
  actions: {
  },
  modules: {
  },
  plugins: [vuexLocal.plugin],
})
